<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:mif="urn:hl7-org:v3/mif"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="urn:hl7-org:v3 ..\sdschemas\SDA.xsd">
    <#assign templateData={"title":"重性精神疾病患者个人信息登记", "code":"HSDB04.03", "templateId":"2.16.156.10011.2.1.1.14"}>
    <#include "fragment/header/headerEles.ftl">
    <#include "fragment/header/recordTarget.ftl">
    <#include "fragment/header/author.ftl">
    <#include "fragment/header/custodian.ftl">
    <!-- 签字医生 -->
    <legalAuthenticator>
        <time/>
        <signatureCode></signatureCode>
        <assignedEntity>
            <id/>
            <assignedPerson>
                <name>${docData.legalAuthenticator.name}</name>
            </assignedPerson>
        </assignedEntity>
    </legalAuthenticator>
    <#include "fragment/header/participant.ftl">
    <component>
        <structuredBody>
            <!--知情同意章节-->
            <component>
                <section>
                    <code code="34895-3" displayName="EDUCATION NOTE" codeSystem="2.16.840.1.113883.6.1"
                          codeSystemName="LOINC"/>
                    <text/>
                    <!-- 条目：知情同意管理标志：标识个体是否签署知情同意书-->
                    <entry>
                        <observation classCode="OBS" moodCode="EVN">
                            <code code="DE06.00.155.00" codeSystem="2.16.156.10011.2.2.1" codeSystemName="卫生信息数据元目录"
                                  displayName="知情同意管理标志"/>
                            <value xsi:type="BL" value="${docData.zhiQingTY.guanLiBZ}"></value>
                        </observation>
                    </entry>
                    <entry>
                        <observation classCode="OBS" moodCode="EVN">
                            <code code="DE02.01.039.00" codeSystem="2.16.156.10011.2.2.1" codeSystemName="卫生信息数据元目录"
                                  displayName="知情同意签字人姓名"/>
                            <value xsi:type="ST">${docData.zhiQingTY.qianZiRXM}</value>
                        </observation>
                    </entry>
                    <entry>
                        <observation classCode="OBS" moodCode="EVN">
                            <code code="DE06.00.156.00" codeSystem="2.16.156.10011.2.2.1" codeSystemName="卫生信息数据元目录"
                                  displayName="知情同意签字日期"/>
                            <value xsi:type="TS" value="${docData.zhiQingTY.qianZiRQ}"/>
                        </observation>
                    </entry>
                </section>
            </component>
            <!-- 重性精神病患者健康史章节 -->
            <component>
                <section>
                    <code displayName="重性精神病患者健康史"></code>
                    <text/>
                    <entry>
                        <observation classCode="OBS" moodCode="EVN">
                            <code code="DE02.10.089.00" displayName="重性精神疾病患者首次发病年龄（岁）"
                                  codeSystem="2.16.156.10011.2.2.1" codeSystemName="卫生信息数据元目录"/>
                            <value xsi:type="PQ" value="${docData.jianKangShi.shouCiFBNL}" unit="岁"/>
                        </observation>
                    </entry>
                    <!-- 条目：精神症状代码 DE02.10.089.00 -->
                    <entry>
                        <observation classCode="OBS" moodCode="EVN">
                            <code code="DE04.01.030.00" codeSystem="2.16.156.10011.2.2.1" codeSystemName="卫生信息数据元目录"
                                  displayName="精神症状代码"/>
                            <value xsi:type="CD" code="${docData.jianKangShi.jingShenZZ.code}"
                                   displayName="${docData.jianKangShi.jingShenZZ.displayName}"
                                   codeSystem="2.16.156.10011.2.3.1.49"
                                   codeSystemName="精神症状代码表"></value>
                        </observation>
                    </entry>
                    <#if docData.jianKangShi.jiWangZLQK??>
                        <entry>
                            <observation classCode="OBS" moodCode="EVN">
                                <code code="DE02.10.036.00" displayName="既往治疗情况" codeSystem="2.16.156.10011.2.2.1"
                                      codeSystemName="卫生信息数据元目录"/>
                                <value xsi:type="CD" code="${docData.jianKangShi.jiWangZLQK.code}"
                                       displayName="${docData.jianKangShi.jiWangZLQK.displayName}"
                                       codeSystem="2.16.156.10011.2.3.2.63"
                                       codeSystemName="既往门诊治疗情况代码表"/>
                            </observation>
                        </entry>
                    </#if>
                    <#if docData.jianKangShi.shouCiKJSBZLRQ??>
                        <entry>
                            <observation classCode="OBS" moodCode="EVN">
                                <code code="DE02.10.160.00" displayName="首次抗精神神病治疗日期" codeSystem="2.16.156.10011.2.2.1"
                                      codeSystemName="卫生信息数据元目录"/>
                                <value xsi:type="TS" value="${docData.jianKangShi.shouCiKJSBZLRQ}"/>
                            </observation>
                        </entry>
                    </#if>
                    <entry>
                        <observation classCode="OBS" moodCode="EVN">
                            <code code="DE02.10.090.00" displayName="既往精神专科住院次数" codeSystem="2.16.156.10011.2.2.1"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value xsi:type="INT" value="${docData.jianKangShi.jiWangJSZKZYCS}"/>
                        </observation>
                    </entry>
                    <entry>
                        <observation classCode="OBS" moodCode="EVN">
                            <code code="DE02.10.037.00" displayName="既往治疗效果" codeSystem="2.16.156.10011.2.2.1"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value xsi:type="CD" code="${docData.jianKangShi.jiWangZLXG.code}"
                                   displayName="${docData.jianKangShi.jiWangZLXG.displayName}"
                                   codeSystem="2.16.156.10011.2.3.1.148"
                                   codeSystemName="疾病转归代码表"/>
                        </observation>
                    </entry>
                </section>
            </component>
            <!-- 主要健康问题章节-->
            <component>
                <section>
                    <code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"
                          displayName="PROBLEM LIST"/>
                    <text/>
                    <!-- 条目：患病对家庭社会的影响类别代码-->
                    <entry>
                        <observation classCode="OBS" moodCode="EVN">
                            <code code="DE03.00.023.00" codeSystem="2.16.156.10011.2.2.1" codeSystemName="卫生信息数据元目录"
                                  displayName="患病对家庭社会的影响类别代码"/>
                            <value xsi:type="CD" code="${docData.zhuYaoJKWT.huanBingSHYXLB.code}"
                                   displayName="${docData.zhuYaoJKWT.huanBingSHYXLB.displayName}"
                                   codeSystem="2.16.156.10011.2.3.1.24"
                                   codeSystemName="患重性精神疾病对家庭社会的影响代码表"></value>
                            <entryRelationship typeCode="COMP">
                                <!-- 条目：患病对家庭社会的影响次数-->
                                <observation classCode="OBS" moodCode="EVN">
                                    <code code="DE03.00.022.00" codeSystem="2.16.156.10011.2.2.1"
                                          codeSystemName="卫生信息数据元目录" displayName="患病对家庭社会的影响次数（次）代码"/>
                                    <value xsi:type="INT" value="${docData.zhuYaoJKWT.huanBingSHYXCS}"></value>
                                </observation>
                            </entryRelationship>
                        </observation>
                    </entry>
                    <!-- 条目：关锁情况代码-->
                    <entry>
                        <observation classCode="OBS" moodCode="EVN">
                            <code code="DE03.00.017.00" codeSystem="2.16.156.10011.2.2.1" codeSystemName="卫生信息数据元目录"
                                  displayName="关锁情况代码"/>
                            <value xsi:type="CD" code="${docData.zhuYaoJKWT.guanSuoQK.code}"
                                   displayName="${docData.zhuYaoJKWT.guanSuoQK.displayName}"
                                   codeSystem="2.16.156.10011.2.3.2.30"
                                   codeSystemName="关锁情况代码表"></value>
                        </observation>
                    </entry>
                    <!-- 条目：经济状况代码-->
                    <entry>
                        <observation classCode="OBS" moodCode="EVN">
                            <code code="DE02.01.023.00" codeSystem="2.16.156.10011.2.2.1" codeSystemName="卫生信息数据元目录"
                                  displayName="经济状况代码"/>
                            <value xsi:type="CD" code="${docData.zhuYaoJKWT.jingJiQK.code}"
                                   displayName="${docData.zhuYaoJKWT.jingJiQK.displayName}"
                                   codeSystem="2.16.156.10011.2.3.2.31"
                                   codeSystemName="经济状况代码表"></value>
                        </observation>
                    </entry>
                </section>
            </component>
            <!-- 诊断记录章节 -->
            <component>
                <section>
                    <code code="29548-5" displayName="Diagnosis" codeSystem="2.16.840.1.113883.6.1"
                          codeSystemName="LOINC"/>
                    <text/>
                    <#if docData.zhenDuanJL.jiBingDM??>
                        <entry>
                            <observation classCode="OBS" moodCode="DEF">
                                <code code="DE05.01.071.00" codeSystem="2.16.156.10011.2.2.1" codeSystemName="卫生信息数据元目录"
                                      displayName="重性精神疾病名称代码"></code>
                                <effectiveTime value="${docData.zhenDuanJL.queZhenRQ}"></effectiveTime>
                                <value xsi:type="CD" code="${docData.zhenDuanJL.jiBingDM.code}"
                                       displayName="${docData.zhenDuanJL.jiBingDM.displayName}"
                                       codeSystem="2.16.156.10011.2.3.1.135"
                                       codeSystemName=" 重性精神疾病名称代码表"/>
                                <performer>
                                    <assignedEntity>
                                        <id/>
                                        <representedOrganization>
                                            <name>${docData.zhenDuanJL.queZhenYLJGMC}</name>
                                        </representedOrganization>
                                    </assignedEntity>
                                </performer>
                            </observation>
                        </entry>
                    </#if>
                </section>
            </component>
            <!-- 健康评估章节 -->
            <component>
                <section>
                    <code code="51848-0" displayName="Assessment note" codeSystem="2.16.840.1.113883.6.1"
                          codeSystemName="LOINC"/>
                    <text/>
                    <!--条目：重性精神病随访评估[仅适用于重性精神病人群]-->
                    <#if docData.jianKangPG.zhuanKeYSYJ??>
                        <entry>
                            <observation classCode="OBS" moodCode="EVN">
                                <code code="DE05.10.120.00" displayName="专科医生意见" codeSystem="2.16.156.10011.2.2.1"
                                      codeSystemName="卫生信息数据元目录"/>
                                <value xsi:type="ST">${docData.jianKangPG.zhuanKeYSYJ}</value>
                            </observation>
                        </entry>
                    </#if>
                </section>
            </component>
        </structuredBody>
    </component>
</ClinicalDocument>